﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using NBFBLL;
using System.ServiceModel.Web;
using System.ServiceModel.Activation;
using System.Data;


namespace NBFWcfService
{
    // 注意: 如果更改此处的类名 "FundYield"，也必须更新 Web.config 中对 "FundYield" 的引用。
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class FundYield : IFundYield
    {
        protected FundYieldBLL fy_bll = new FundYieldBLL();
        #region IFundYield 成员

        [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, Method = "POST")]
        public System.Data.DataSet GetNowFundList(string zdid)
        {
            return fy_bll.GetNowFundList(zdid);
        }
        
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)] 
        public DataSet GetHistoryFundList(string zdid, DateTime startDay, DateTime endDay)
        {
            return fy_bll.GetHistoryFundList(zdid, startDay, endDay);
        }

        [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, Method = "POST")]
        public int jisuanOnejjForShenzhen(string openid)
        {
            return fy_bll.jisuanOnejjForShenzhen(openid);
        }

        [WebGet(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json)]
        public DataSet getRealShouyilv(string zdid)
        {
            return fy_bll.getRealShouyilv(zdid);
        }

        [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, Method = "POST")]
        public double jisuanZhuHeForShenzhen(string zdid)
        {
            return fy_bll.jisuanZhuHeForShenzhen(zdid);
        }

        [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, Method = "POST")]
        public double GetZhuHeSYL(string zdid)
        {
            return fy_bll.GetZhuHeSYL(zdid);
        }

        #endregion
    }
}
